Jump to content

how to color parts in google map


Recommended Posts

Good day!

I want to ask how can I color some parts of the Google Map.

I'm a bit of a beginner in LabVIEW (still learning the ropes) that's why I searched about putting a google map in LabVIEW and I found some. The question is, how can I add colors to them? In a specific place? Not exactly a pure color but just a shade to them?

Here's what I'm planning to do.

post-51873-0-89281100-1400788036_thumb.p

That's the Google Map of NCR (some place here in the Philippines) and I'm planning to add colors to some parts. How can I do it?

 

Thank you very very much for the help.

Link to comment
Have you tried doing the same thing as changing the color in an image, but would use the Hilite Color VI instead of replacing with green?

(reference: http://lavag.org/topic/18220-changing-colors-in-a-specific-part-of-image/ )

I tried but I got confused for a bit so I erased it. So I tried changing a color of an image by replacing a new color (example, looking for a color green and changing all green to white) but I'm still not sure if I'm on the right track.

LabVIEW is just the host.

 

You need to create a KML file then get Google Maps to load it.

I looked at the link you said and I have a question. If I'm going to make a KML file to load it on Google Map, will the coloring part be done through the map's coordinates?

Link to comment

Check out the LabView <-> google maps code on the code repository. It translates LV variants to Google maps JSON objects, and sends them via web socket to a browser. You can easily draw a polygon wherever you want with those VIs.  

Edit: Here is the link: http://lavag.org/files/file/236-labview-google-maps-websocket-interface/

Edited by Gribo
Link to comment
Check out the LabView <-> google maps code on the code repository. It translates LV variants to Google maps JSON objects, and sends them via web socket to a browser. You can easily draw a polygon wherever you want with those VIs.  

Edit: Here is the link: http://lavag.org/files/file/236-labview-google-maps-websocket-interface/

Thank you very much. I will try it and post the results here. 

Link to comment
Check out the LabView <-> google maps code on the code repository. It translates LV variants to Google maps JSON objects, and sends them via web socket to a browser. You can easily draw a polygon wherever you want with those VIs.  

Edit: Here is the link: http://lavag.org/files/file/236-labview-google-maps-websocket-interface/

I could not open the VI properly. It has some errors where subVIs are missing.

Link to comment
I tried but I got confused for a bit so I erased it. So I tried changing a color of an image by replacing a new color (example, looking for a color green and changing all green to white) but I'm still not sure if I'm on the right track.

I looked at the link you said and I have a question. If I'm going to make a KML file to load it on Google Map, will the coloring part be done through the map's coordinates?

 

Not sure what you are asking here, but KML has the ability to define the colour of a polygon (or line). The polygon is defined by map coordinates 

 

Here's a simple example that I found by Googling that enables you to turn on and off a coloured KML overlay.

  • Like 1
Link to comment
Not sure what you are asking here, but KML has the ability to define the colour of a polygon (or line). The polygon is defined by map coordinates 

 

Here's a simple example that I found by Googling that enables you to turn on and off a coloured KML overlay.

Okay okay. I will check the link. :) Actually, I searched about KML and I found some sites on how to make them. :)

Thank you! I will post here the results soon. :)

Link to comment
I made a KML file. How can I put it in Google Map and put it in LabVIEW? Should I download the packages you mentioned?

You can use that software if you are using Google Earth (never used it, so don't know if it works or not). But if you are using Google Maps from a web browser as an activeX (or.NET) component in LabVIEW it's even easier.

Log in to Google Maps with your google account. Click on My Places and that will take you to a page where you can create maps.

Create a new map, add your KML overlay file and then just point your LabvIEW thing (browser?) to that map.

Edited by ShaunR
Link to comment
You can use that software if you are using Google Earth (never used it, so don't know if it works or not). But if you are using Google Maps from a web browser as an activeX (or.NET) component in LabVIEW it's even easier.

Log in to Google Maps with your google account. Click on My Places and that will take you to a page where you can create maps.

Create a new map, add your KML overlay file and then just point your LabvIEW thing (browser?) to that map.

How can I put the browser to the LabVIEW? Is there some kind of URL?

Link to comment

How can I put this KML files with google map on my VI?

attachicon.gifKML files.zip

attachicon.gifRAINFALL2 mod.vi

 

Well. You you won't be able to use Google Maps without a lot more experience with web applications and JavaScript.

This is the easy way, but you will have difficulty updating the map, online, programmatically from you application..

 

Web Rainfall.vi

 

You will have to download and install Google Earth instead of using Google Maps and use the library previously linked (if it works) to add your KML to the Google Earth interface.

Link to comment
Well. You you won't be able to use Google Maps without a lot more experience with web applications and JavaScript.

This is the easy way, but you will have difficulty updating the map, online, programmatically from you application..

 

attachicon.gifWeb Rainfall.vi

 

You will have to download and install Google Earth instead of using Google Maps and use the library previously linked (if it works) to add your KML to the Google Earth interface.

Oh thank you. Actually, that is what I'm looking for, an easy way to show it. I also don't have plans on changing it from my VI. I just want to show the KML file. 

Thank you. :)

I'll post here if I have questions. 

Link to comment
Well. You you won't be able to use Google Maps without a lot more experience with web applications and JavaScript.

This is the easy way, but you will have difficulty updating the map, online, programmatically from you application..

 

attachicon.gifWeb Rainfall.vi

 

You will have to download and install Google Earth instead of using Google Maps and use the library previously linked (if it works) to add your KML to the Google Earth interface.

What if I'm planning to change the KML file shown. In what part of the path will I edit it?

Link to comment


 

What if I'm planning to change the KML file shown. In what part of the path will I edit it?


You don't.

 

Log in to Google Maps with your google account. Click on My Places and that will take you to a page where you can create maps.
Create a new map, add your KML overlay file and then just point your LabvIEW thing (browser?) to that map.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.