Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inser map from url 2

Status
Not open for further replies.

sal21

Programmer
Apr 26, 2004
411
0
16
IT
based:
Private Sub MAPPA()

'
'SEE THE LAST POST

Dim strurl As String
strurl = "
Shape1.Fill.UserPicture strurl

End Sub

i have insert a shape on form but have error:

metod or data member not found

.Fill

note:
i just have a shape1 on form
naturally other way are welcomed, also to use image1
 
Curiosity...
based:
wp0 = "Naples,80100"
wp1 = "Rome,00100"
WebBrowser1.Navigate " & wp0 & "&wp.1=" & wp1 & "&mapsize=640,480&key=<your bing key>"

possible to set in the query string the state to the default Italy. instead to set the city in wpo, and wp1 and use only a zip code?
 
That's all pretty much down to the Bing REST API - not VB. I've pointed you as repeatedly to the documentation for this. And I'm not a Bing guru, I've just been reading that self-same documentation, but it reaches a point where you have to help yourself.

From my reading of the documentation, and how Bing recognizes locations, this ought to be possible, but I think you need to investigate for yourself.
 
Hi stronm,
i'm on testing...
...
Me.LORA.Caption = TimeSerial(0, 0, GetFirstNamedNode("TravelDuration", nodes).Text) & " (HH:MM:SS)"
....

'<TravelDuration>48812</TravelDuration>

Have overflow, error 6

is possible, because the number in node is very big?
 
As I have previously noted, my code is presented as illustrative examples; it is NOT production code. Here, for example, TimeSerial was used as a quick shortcut to display journey duration for THIS specific example. However, if you check the documentation for TimeSerial you will see that the seconds parameter for the function is an Integer, and so limited to a maximum of 32767 (and timeserial has some other limitations); you'll need to construct your own function if you want to deal with durations of higher than that number of seconds, and also for periods greater than 24 hours.

 
How to about:

Dim T As Long
T = GetFirstNameNode(...).Text
Me.LORA.Caption = Format(T / 86400, "hh:mm:ss") & " (HH:MM:SS)
 
Breaks once you hit 24 hours, but that might be OK for your use case.
 
hi strongm,
the project is finally completed at 90%! Tks.

Only one tips, please.

Possible to check when the .sed is completed, similar READYSTATE_COMPLETE

on:
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", APICall & Query & strKey, False
.send
'Sleep (100)
myXML.loadXML .responseText 'raw xml
Set nodes = myXML.selectNodes("//*")
Me.LKM.Caption = GetFirstNamedNode("TravelDistance", nodes).Text & " (KM.MM)"
T = GetFirstNamedNode("TravelDuration", nodes).Text
Me.LORA.Caption = Format(T / 86400, "HH:MM:SS") & " (HH:MM:SS)"
End With

my test:
...
Do While myXML.readyState = 4
Sleep (100)
Exit Do
Loop
...
 
You can poll .ReadyState, as your recently added test code assumes. However, VB6 does not have a sleep function, so your test code won't actually run (unless you have written yourself a viable sleep function)


There are some more sophisticated methods involving hooking up MSXML2.XMLHTTP to an event handler, but I think they may be a little too complex for you to want to use.
 
hi strongm...

;16;&wp.1=44,9092,8,6101;16;&mapsize=640,480&C=IT&key=xxxxxxxxxxxxxxxxxxxxxxxxxx

In bold is a parameter to change the label of points.
Now i want add a label, similar:

;16;'Home'

but the font color to the default is withe!
Possible to change the label color?

i have seen in:
Link
 
The REST ASSPI supports style settings - but I don't think there is one for icon label colour. I suspect that if you need that level of control then you need to start looking at the more complex Bing Maps Webcontrol that I've previously mentioned. And that takes you way out of scope for this forum.
 
Strong see wath i have, now!

this url return a coordinate point of single icon, based resolution!

How to use in my project to check if the mouse is over icon(mouse_over event), instead to use a color parameter?

this url return the image:

my code to pass the image in picturebox2, in picture2:

URLSTRING = " & LLwp0 & PUSHPIN & "&wp.1=" & LLwp1 & PUSHPIN1 & "&mapsize=640,480&C=IT&format=jpeg&key=" & APIKEY
'Debug.Print URLSTRING
'Sleep (200)

DownloadFile URLSTRING, "C:\SERVIZIO\Mymap.jpg"
Sleep (200)

Me.Picture2.Picture = LoadPicture("C:\SERVIZIO\Mymap.jpg")

in effect i need to check when the mouse cursor is on a single icon, red and blue
 
Well, since you are shoving the image into a PictureBox you camn always use the PictureBox's MouseMove event to peek at the colour of the pixel under the pointer with the Point method.
 
ops...
But have see in internal icon are present a gradient color not a solid color, i can test only if in iternal color are solid, with my knoledngent:-(

peraphs with the first url (retirn a metadat Json text) in my last post can help me....that return a x y coordinate of each anchor of icon, possible to work around this possibilty?

This is the url in question:

Link
 
You are trying to add stuff to your original question ... you seem to be trying to make your own mapping applicvation. As advised above, if you need this level of interactivity and dynamism with the map, you really need to be looking at the Bingf Maps webcontrol, which can do all this kind of stuff, rather than attempting to reinvent the wheel

 
hI STRONG, with your help my project is completed at 90%, tkx!

But have an idea how to get, based api rest big map, all Zip code, based a city name in Italy?

For example:

Roma
list all zip code of this city.

other way are welcome!
 
You are tacking a new question on. My advice would be to start a new thread for this - except it isn't really a VB6 question. It's Bing Maps question ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top