Jump to content

Gribo

Members
  • Posts

    225
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Gribo

  1. Hello,

     Following my previous attempt with Google maps, Here is a websocket based link between LV and Google maps.

     

    Websocket class by S.Marlow http://evexiallc.com/index.php

    JSON API by drjdpowell

     

    Javascripts and demo application are based on the Webpanel demo application.

     

    Instructions:

    1. Obtain a Google maps API key. 

    2. Edit the WP_Googlemaps.html and add the key to the relevant script tag.

    3. Start the demo vi (google maps demo.vi)

    4. Open the WP_Googlemaps.html with a modern browser.

     

    I have tested it with Chrome and Safari on iPhone 4.

     

    You might have to point to the correct path of some VIs, they are included in the vi directory.

    gmaps_websockets_LV2013.zip

  2. I am stuck. Trying to get the next function (Polylines) to work is quite complex. I need to pass an array of coordinates (Latitude, Longitude) to the browser, but cannot get it to understand JSON objects. Does anyone have an advise regarding this? Taking it one step at a time, I am trying to pass a single coordinate cluster. Below is the Javascript code:

     

     

    function addmarkerJSON (Pmap, latlng, Title){//var Platlng = eval ('('+latlng+')');var Platlng = JSON.parse (latlng,function (key, value) {    var type;    if (value && typeof value === 'object') {        type = value.type;        if (typeof type === 'string' && typeof window[type] === 'function') {            return new (window[type])(value);        }    }    return value;});var options = {position: new google.maps.LatLng(Platlng.lat,Platlng.lng),map: Pmap,title: Title};alert(Platlng.lat);PMarker = new google.maps.Marker (options);return latlng.lat;}

     

     

    post-46572-0-21362000-1385383945_thumb.p

  3. index.php?app=downloads&module=display&section=screenshot&id=234

    Name: Labview <-> Google maps VI

    Submitter: Gribo

    Submitted: 12 Nov 2013

    Category: *Uncertified*

    LabVIEW Version: 2011

    License Type: BSD (Most common)

    Connects to google maps javascript V3 api using the web browser .NET object (it exposes the HTML DOM model, where as the ActiveX control does not). This is an improvement over the examples from NI, as it allows dynamic adjustments to all of the map objects. Currently, only circle and marker are implemented.

    Click here to download this file

    • Like 1
×
×
  • Create New...

Important Information

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