Search Results

Search found 77 results on 4 pages for 'googlemaps'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Using GoogleMaps with JXMapKit

    - by npinti
    I have been searching on the web to see if I can use GoogleMaps with the JXMapViewer. According to this, it is illegal, but the article is more than three years old. Could anyone be kind enough to tell me if I can use GoogleMaps with the JXMap viewer? I know that Google has recently allowed desktop applications to use their static maps provided that the application is freely accessible to people on some website. If this can be done, I would appreciate some pointer to where I could start looking so that I can use Google Maps, I tried messing around with this but to no avail. Thanks in advance. Edit: I have managed to show a map in my JXMapKit. The only problem is that I am getting the image as a tiled image, whilst I only need one. Any help on this issue?

    Read the article

  • Using GoogleMaps with JXMapViewer

    - by npinti
    I have been searching on the web to see if I can use GoogleMaps with the JXMapViewer. According to this, it is illegal, but the article is more than three years old. Could anyone be kind enough to tell me if I can use GoogleMaps with the JXMap viewer? I know that Google has recently allowed desktop applications to use their static maps provided that the application is freely accessible to people on some website. If this can be done, I would appreciate some pointer to where I could start looking so that I can use Google Maps, I tried messing around with this but to no avail. Thanks in advance.

    Read the article

  • [GoogleMaps] Get GLatLng from GPoint

    - by Jo Asakura
    Hello everybody, I have a google map with my own map type: var currentProjection = new GMercatorProjection(maxLevels + 1); var mapBounds = new GLatLngBounds(new GLatLng(-9, -15), new GLatLng(9, 15)); var custommap = new GMapType(tilelayers, currentProjection, "Some project"); map.addMapType(custommap); map.setCenter(mapBounds.getCenter(), minLevels, custommap); When user clicks on map then context menu appears (singlerightclick event), from context menu user can add markers and I need a GLatLng value to add marker to the map but singlerightclick event contains only GPoint value. I try to use next statement: map.getCurrentMapType().getProjection().fromPixelToLatLng(pointValueFromEvent, map.getZoom()); but it wasn't helpfull (GLatLng value is outside of my map). I think it's because I use my own map type, how can I get GLatLng value to add the marker? Best regards, Alex.

    Read the article

  • basic javascript question on geolocation and googlemaps

    - by ade
    hello all, Im hoping that somebody can help me out on what i feel is an easy answer but I just cant get it to work out. Im trying to trap the geolocation lat and long and place it into the google maps api so far i have var myOptions = { zoom:7, trips:1, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map"), myOptions); directionsDisplay.setMap(map); var request = { origin: 'newyork' destination: 'deleware', travelMode: google.maps.DirectionsTravelMode.DRIVING }; this works fine for what i want. how ever I want to be able to change Origin to the users lat long using the following script from google.maps.api. their code is: if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); var placeMarker = new google.maps.Marker({ position: initialLocation, map: map, }); map.setCenter(initialLocation); }, function() { handleNoGeolocation(browserSupportFlag); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(); } function handleNoGeolocation() { initialLocation = newyork; map.setCenter(initialLocation); } I want to pull out the navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); and allocate it two 2 varibles, myLat and myLong. I then want to be able to change my orignal script from var request = { origin: 'newyork' destination: 'deleware', travelMode: google.maps.DirectionsTravelMode.DRIVING }; to var request = { origin: myLat,myLong destination: 'deleware', travelMode: google.maps.DirectionsTravelMode.DRIVING }; Does this make sense..? Im currently having a pig with it and as im not a JS developer its what i think should be a simple bit of coding that im losing the battle with.. any thoughts..?

    Read the article

  • JSP Googlemaps taglib not found, where have I gone wrong?

    - by James.Elsey
    I'm trying to add Google Maps onto my JSPs by using the Googlemaps taglib. I've added this into my maven pom <dependency> <groupId>com.lamatek</groupId> <artifactId>googlemaps</artifactId> <version>0.98c</version> <scope>provided<>/scope </dependency> This then included the googlemaps-0.98c library under my project libraries in NetBeans, I right clicked and selected Manually install artifact and located the googlemaps.jar file I had downloaded. I've then added this into my taglibs file <%@taglib prefix="googlemaps" uri="/WEB-INF/googlemaps" %> And have then included this where I actually want to show a map on my jsp <googlemaps:map id="map" width="250" height="300" version="2" type="STREET" zoom="12"> <googlemaps:key domain="localhost" key="xxxx"/> <googlemaps:point id="point1" address="74 Connors Lane" city="Elkton" state="MD" zipcode="21921" country="US"/> <googlemaps:marker id="marker1" point="point1"/> </googlemaps:map> But when I load up my application, I get the following error. org.apache.jasper.JasperException: /jsp/dashboard.jsp(1,1) /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found root cause org.apache.jasper.JasperException: /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found Have I missed something simple? I'm unable to spot what I've done wrong so far..

    Read the article

  • DirectionsDistance in google maps API v3

    - by Yawn
    Hey, I'm trying to work out how to use this to get the distance from the successful directions: http://code.google.com/apis/maps/documentation/v3/reference.html#DirectionsDistance This is the code I have so far: var googleMaps = { // HTML Nodes fromInput: google_maps_from, toInput: google_maps_to, // API Objects dirService: new google.maps.DirectionsService(), dirRenderer: new google.maps.DirectionsRenderer(), map: null, showDirections: function(dirResult, dirStatus) { if (dirStatus != google.maps.DirectionsStatus.OK) { //Here we'll handle the errors a bit better :P alert('Directions failed: ' + dirStatus); return; } else { //Get the distance here //onGDirectionsLoad(); } // Show directions googleMaps.dirRenderer.setMap(googleMaps.map); googleMaps.dirRenderer.setPanel(document.getElementById("directions")); googleMaps.dirRenderer.setDirections(dirResult); }, getSelectedTravelMode: function() { return google.maps.DirectionsTravelMode.DRIVING; }, getSelectedUnitSystem: function() { return google.maps.DirectionsUnitSystem.METRIC; }, getDirections: function() { var fromStr = googleMaps.fromInput; var toStr = googleMaps.toInput; var dirRequest = { origin: fromStr, destination: toStr, travelMode: googleMaps.getSelectedTravelMode(), unitSystem: googleMaps.getSelectedUnitSystem(), provideTripAlternatives: true }; googleMaps.dirService.route(dirRequest, googleMaps.showDirections); }, init: function() { googleMaps.map = new google.maps.Map(document.getElementById("map_canvas"), { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); // Show directions onload googleMaps.getDirections(); } }; // Onload handler to fire off the app. google.maps.event.addDomListener(window, 'load', googleMaps.init); I could do this just fine in v2, just having trouble working out the v3 equivalent :x

    Read the article

  • jstl taglib not found, where have I gone wrong?

    - by James.Elsey
    I'm trying to add Google Maps onto my JSPs by using the googlemaps jstl taglib. I've added this into my maven pom <dependency> <groupId>com.lamatek</groupId> <artifactId>googlemaps</artifactId> <version>0.98c</version> <scope>provided<>/scope </dependency> This then included the googlemaps-0.98c library under my project libraries in NetBeans, I right clicked and selected Manually install artifact and located the googlemaps.jar file I had downloaded. I've then added this into my taglibs file <%@taglib prefix="googlemaps" uri="/WEB-INF/googlemaps" %> And have then included this where I actually want to show a map on my jsp <googlemaps:map id="map" width="250" height="300" version="2" type="STREET" zoom="12"> <googlemaps:key domain="localhost" key="xxxx"/> <googlemaps:point id="point1" address="74 Connors Lane" city="Elkton" state="MD" zipcode="21921" country="US"/> <googlemaps:marker id="marker1" point="point1"/> </googlemaps:map> But when I load up my application, I get the following error. org.apache.jasper.JasperException: /jsp/dashboard.jsp(1,1) /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found root cause org.apache.jasper.JasperException: /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found Have I missed something simple? I'm unable to spot what I've done wrong so far.. Thanks

    Read the article

  • GoogleMaps API draw polygon over a complete town

    - by Frank
    Hello SOers, I'm wondering if it's actually possible to draw a polygon over a complete town with the GoogleMaps API V3 or the V2? If so could you please give an example on how to do it (choose your favorite town :)). I've some difficulties understanding this API. Thanks.

    Read the article

  • dynamically drawing polylines on googlemaps using php/mysql

    - by arc
    Hi. I am new to the googlemaps API. I have written a small app for my mobile phone that periodically updates its location to an SQL databse. I would like to display this information on a googlemap in my browser. Ideally i'd like to then poll the database periodically and if any new co-ords have arrived, add them to the line. Best way of describing it is this; http://tiny.cc/HEIa0 In a quest to get to there, i've started on the documents on google and been modifying them to try and acheive what I want. It doesn't work - and i don't know enough to know why. I would love some advice as to why, and any pointers towards my ultimate goal would be very much welcomed. Google Maps AJAX + MySQL/PHP Example <script type="text/javascript"> //<![CDATA[ function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(47.614495, -122.341861), 13); GDownloadUrl("phpsqlajax_genxml.php", function(data) { var xml = GXml.parse(data); var line = []; var markers = xml.documentElement.getElementsByTagName("points"); for (var i = 0; i < points.length; i++) { var point = points.item(i); var lat = point.getAttribute("lat"); var lng = point.getAttribute("lng"); var latlng = new GLatLng(lat, lng); line.push(latlng); if (point.firstChild) { var station = point.firstChild.nodeValue; var marker = createMarker(latlng, station); map.addOverlay(marker); } } var polyline = new GPolyline(line, "#ff0000", 3, 1); map.addOverlay(polyline); }); } //]]> My php file is generating the following XML; <?xml version="1.0" encoding="UTF-8" ?> <points> <point lng="-122.340141" lat="47.608940"/> <point lng="-122.344391" lat="47.613590"/> <point lng="-122.356445" lat="47.624561"/> <point lng="-122.337654" lat="47.606365"/> <point lng="-122.345673" lat="47.612823"/> <point lng="-122.340363" lat="47.605961"/> <point lng="-122.345467" lat="47.613976"/> <point lng="-122.326584" lat="47.617214"/> <point lng="-122.342834" lat="47.610126"/> </points> I have successfully worked through this; http://code.google.com/apis/maps/articles/phpsqlajax.html before attempting to customise the code. Any pointers? Where am I go wrong?

    Read the article

  • Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

    - by Soumya Simanta
    Hi, I cannot figure out the origin of the ConcurrentModificationException. In my activity I'm calling updateMapOverlay(). I'm also calling updateMapOverlay() inside another Thread (a TimerTask) that is invoked on regular intervals. I'm taking the appropriate locks when invoking updateMapOverlay() from both the threads. Is this problem being caused because I'm invoking updateMapOverlay from inside a non-UI thread (i.e., TimerTask). Has anyone else faced a similar issue ? private void updateMapOverlay() { this.itemizedOverlay.refreshItems(createOverlayItemsList()); List<Overlay> overlays = mapView.getOverlays(); overlays.clear(); overlays.add(cotItemizedOverlay); this.mapview.invalidate(); } Thanks. Exception: W/dalvikvm(10641): threadid=3: thread exiting with uncaught exception (group=0x4001b180) E/AndroidRuntime(10641): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime(10641): java.util.ConcurrentModificationException E/AndroidRuntime(10641): at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:64) E/AndroidRuntime(10641): at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:41) E/AndroidRuntime(10641): at com.google.android.maps.MapView.onDraw(MapView.java:494) E/AndroidRuntime(10641): at android.view.View.draw(View.java:6535) E/AndroidRuntime(10641): at android.view.ViewGroup.drawChild(ViewGroup.java:1531) E/AndroidRuntime(10641): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime(10641): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime(10641): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime(10641): at android.view.View.draw(View.java:6538) E/AndroidRuntime(10641): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/AndroidRuntime(10641): at android.view.ViewGroup.drawChild(ViewGroup.java:1531) E/AndroidRuntime(10641): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime(10641): at android.view.ViewGroup.drawChild(ViewGroup.java:1529) E/AndroidRuntime(10641): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258) E/AndroidRuntime(10641): at android.view.View.draw(View.java:6538) E/AndroidRuntime(10641): at android.widget.FrameLayout.draw(FrameLayout.java:352) E/AndroidRuntime(10641): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830) E/AndroidRuntime(10641): at android.view.ViewRoot.draw(ViewRoot.java:1349) E/AndroidRuntime(10641): at android.view.ViewRoot.performTraversals(ViewRoot.java:1114) E/AndroidRuntime(10641): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633) E/AndroidRuntime(10641): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10641): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime(10641): at android.app.ActivityThread.main(ActivityThread.java:4363) E/AndroidRuntime(10641): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10641): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime(10641): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime(10641): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime(10641): at dalvik.system.NativeStart.main(Native Method) I/Process ( 95): Sending signal. PID: 10641 SIG: 3

    Read the article

  • RoR - Polyline in GoogleMaps

    - by Arwed
    I'm using Ym4r and want to add a polyline to my map. This works: polyline = GPolyline.new([[27.4037755983,89.4263076782],[27.5155793659,89.3245124817]],"#ff0000",3,1.0) @map.record_init @map.add_overlay(polyline) But this doesn't: polystring = "[27.4037755983,89.4263076782],[27.5155793659,89.3245124817]" polyline = GPolyline.new([polystring],"#ff0000",3,1.0) @map.record_init @map.add_overlay(polyline) Any idea why? Regards Arwed

    Read the article

  • GoogleMaps API extracting building shape information.

    - by manionml
    Hi, I'm looking for a way to extract building shape (polygon) information from google maps automatically. It appears that you can only downloaded information relating to shapes you've created yourself. Example here. Information relating to building shape and height is stored by google, so I'm hoping there's a way to extract it.

    Read the article

  • getting maps to accept a dynamically generated KML file?

    - by arc
    Hi. I have a button that launches the google maps app on my device via an intent. I want to be able to pass it a php page that generates a KML file. I have done this on a website before using the googlemaps api in JS - but it doesn't seem to work on Android. My php file is as follows; <?php echo '<kml xmlns="http://www.google.com/earth/kml/2">'; echo '<Placemark>'; echo '<name>Google Inc.</name>'; echo '<description>1600 Amphitheatre Parkway, Mountain View, CA 94043</description>'; echo '<Point>'; echo '<coordinates>-122.0841430, 37.4219720, 0</coordinates>'; echo '</Point>'; echo '</Placemark>'; echo '</kml>'; ?> Launching with: final Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=http://website.com/kml_gen.php")); startActivity(myIntent); It launches maps, finds the file - but won't display it 'because it contains errors'. Is this just not possible, or are there other ways to construct the intent that might work?

    Read the article

  • Android Google map balloon over overlayitem

    - by Faisal khan
    I am using google map, displaying overlayitems on the google map. To create balloon effect, i am using customize view and using geopoints with MapView.LayoutParams to display it at particular location. overlayitem's icon and baloon both having same geopoint thats why they both are overriding eatch other. I want to display baloon over the overlayitem icon look like it should point to the icon. Follwing is my code MapView.LayoutParams mapParams = new MapView.LayoutParams(MapView.LayoutParams.WRAP_CONTENT, MapView.LayoutParams.WRAP_CONTENT, mapEvent.getGeoPoint(), MapView.LayoutParams.BOTTOM_CENTER); I want to display baloon like following please tell me should i decrease lat long to make it top ? or should i change the layout param.Bottom or what i tried different variation not working like following

    Read the article

  • Draw 15Km radius around point in Android

    - by Shani
    Hi, I want to draw a a circle of 15 KM radius around a point on Google Maps by using Android. In Android we only have MapView and MapViewController. How can I implement the drawCircle funciton provided in Google Map Circle example in Android.

    Read the article

  • Google Maps API v3: Can I setZoom after fitBounds?

    - by chris
    I have a set of points I want to plot on an embedded Google Map (API v3). I'd like the bounds to accommodate all points unless the zoom level is too low (i.e., zoomed out too much). My approach has been like this: var bounds = new google.maps.LatLngBounds(); // extend bounds with each point gmap.fitBounds(bounds); gmap.setZoom( Math.max(6, gmap.getZoom()) ); This doesn't work. The last line "gmap.setZoom()" doesn't change the zoom level of the map if called directly after fitBounds. Is there a way to get the zoom level of a bounds without applying it to the map? Other ideas to solve this?

    Read the article

  • how to clear all map overlays or markers from google map in android?

    - by UMMA
    dear friends, i want to clear all map overlays or markers from google map and using following code if(!mapOverlays.isEmpty()) { mapOverlays.clear(); } which is giving me exception can any one guide me? am i right or wrong if i am wrong then kindly provide me the solution to my problem. i want map clean if there is any marker on it. any help would be appriciated.

    Read the article

  • How to actually query Chinese address in Googlemap API geocoding??

    - by Robert
    I'm following the demo code from article of phpsqlgeocode.html In the db, I inserted some Chinese addresses, which is utf8 encode. I found after urlencode the Chinese address, the output of the address will be wrong.Like this one: http://maps.google.com.tw/maps/geo?output=csv&key=ABQIAAAAfG3KxFZXjEslq8VNxMBpKRR08snBovzCxLQZ9DWwpnzxH-ROPxSAS9Q36m-6OOy0qlwTL6Ht9qp87w&q=%3F%3F%3F%3F%3F%3F%3F%3F%3F132%3F Then output(can't query from php, it have to test as browser url link), 200,5,59.3266963,18.2733433 Whose address is actually located in Taichung Taiwan, but turn out to in Sweden Europe. But when I paste the Chinese address(such as ???????? ?131?56?58?60?) in the url, the result turn out to be fine!!! So my question is how to make sure it send out the original Chiness address?? how to prevent urlencode()??? I found take urlencode() away not change anything. (I've change the MAPS_HOST from maps.google.com to maps.google.com.tw.) (I'm sure my key is right, and other English address geocoding are fine.) Thanks!!

    Read the article

  • Dynamic Overlays slowing down Google Maps (Android 2.1) on Nexus One

    - by Soumya Simanta
    Hi, I'm trying to create a dynamic ItemizedOverylay (please see the code below) on Google Maps (Android 2.1) on a Nexus One. In my Activity (that extends MapActivity) I'm creating a data thread that is receiving data from the network. A 'handler' is used to communicate the data from the receiving thread to map activity. This data contains the locations (lat, lon) of the markers that I want to overlay on my map. The location of each marker is dynamic (i.e., it changes every time I receive new data from the network.) refreshItems(ArrayList<OverlayItem> newItems) method in invoked inside the handleMessage() of the handler. There are around 11 markers in the ArrayList that is passed to refreshItems I can see the markers overlayed on the map. However, I've two issues: The old markers are not removed from the map. After a while I see a trail of markers. The map doesn't respond to any touch commands. I cannot move the map or zoom in or zoom out. After a while I see a system warning that my app is not responding message. Any idea what's wrong here ? Thanks. public class MyItemizedOverlay extends ItemizedOverlay { private ArrayList<OverlayItem> overlayItems; public CoTItemizedOverlay(Drawable defaultMarker) { super(boundCenter(defaultMarker)); overlayItems = new ArrayList<OverlayItem>(); populate(); } public void addNewItem(GeoPoint location, String markerText, String snippet) { overlayItems.add(new OverlayItem(location, markerText, snippet)); populate(); } public void removeItem(int index) { overlayItems.remove(index); populate(); } public void refreshItems(ArrayList<OverlayItem> newItems) { // remove all existing items for (int i = 0; i < cotoverlayItems.size(); i++) { overlayItems.remove(i); } // copy all the times if (newItems != null && cotoverlayItems.size() == 0) { overlayItems.addAll(newItems); } populate(); } @Override protected OverlayItem createItem(int index) { return overlayItems.get(index); } @Override public int size() { return overlayItems.size(); } }

    Read the article

  • Creating a dynamic (video) Overlay on Google Maps on Android 2.1

    - by Soumya
    I'm trying to create a map overlay for displaying a video stream (MJPEG) on top of a Mapview. Currently I've a standalone activity that creates a data thread for fetching MJPEG video frames. I'm using a handler to send a frame (as a Bitmap) from the data thread to the main activity which then updates the UI. I'm not sure how I can implement "refresh" for updating my "overlayed" video stream. EDIT: What I mean by "refresh" is - how can I update the video portion (not the mapview) of my UI whenever I get a new video frame. I plan to paint the video frame (bitmap) in the "draw method" of my implementation of the Overlay subclass. But the "draw" method is not invoked by me directly. Thanks.

    Read the article

1 2 3 4  | Next Page >