Jump to content
wewtalaga

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites

You need few packages, OpenG and JSON Labview, both available from the code repository here, or better yet, via the VIPM.

  • Like 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites


 

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.

Share this post


Link to post
Share on other sites

 

You don't.

What I'm saying is I would like to replace the KML file I provided. In what part in the path below will I change?

post-51873-0-53293700-1401032663_thumb.p

Share this post


Link to post
Share on other sites

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.