Is there a platform agnostic HTML5 map service? - html

I have a Blazor combined client/server side app that uses HTML5 geolocation to return the user device latitude/longitude. I'd like to be able to provide the general "area" the user is in - a bit of a confirmation to the user the thing is working; and someday potentially enable the user to get lat/long for other locations as well. I have not been able to find a native HTML5 map service to go along with its geolocation capabilities, and in fact nearly every search leads to how to connect to Google Maps. I'm using Blazor, though, because I want the app to run and function on essentially every browser, so want to avoid Google Maps or Apple Maps, etc. I also checked quick on GitHub for potential API solutions but didn't see any. Ideas? Thanks!

Related

How to track multiple vehicles with Maps API

I'm working on new application in my workplace as described below:
We have tens trucks working for us. I've installed a GPS module on each of them to track their position and store their coordinates in a database.
I need to see their movements in real time on a map (Google Maps, or Bing Maps) but I don't know how to do this.
I don't want code or snippets, I prefer Guidelines and API Docs or framework to build it!
If you have any question ask without problem! Thanks guys
Since you have the data in a database, the first step would be to expose that data to your app. There are a couple of different ways to do this depending on the type of app you want to create, however the most universal solution would be to create a web service that any of your apps can connect to. Here are a couple of good blog post on how to create spatial web services.
http://blogs.bing.com/maps/2013/07/31/how-to-create-a-spatial-web-service-that-connects-a-database-to-bing-maps-using-ef5
http://blogs.bing.com/maps/2013/08/05/advance-spatial-queries-using-entity-framework-5
Once you have a web service you can then create the app that will display the truck locations. You have a lot of options here; web, mobile, desktop (WPF, Windows app), cross platform. Web apps tend to be the most common as they can be accessed from the most locations. Connecting to a REST service from JavaScript is fairly easy. There is a number of different ways to load in real time data. The easiest is to use a timer that calls your web service regularly and grabs all truck locations. A slightly more complex option, but more efficient is to timestamp the last update of each location and then keep track of the last timestamp used to request an update. By doing this you can limit your request to only retrieve updates that have occurred since the last request. This would significantly reduce your bandwidth and make your app faster. Displaying the actual truck location on a map is easy. Your web service will return the location information, likely as either two number properties (i.e. latitude/longitude) or as a well known text string (simply parse this as shown in the previous blog posts). If using Bing Maps and you have two number properties, you can create a pushpin and add it to the map like this:
var loc = new Microsoft.Maps.Location(latitude,longitude);
var pin = new Microsoft.Maps.Pushpin(loc);
map.entities.push(loc);
Here are some useful resources around developing with Bing Maps:
https://www.bingmapsportal.com/ISDK/AjaxV7
https://msdn.microsoft.com/en-us/library/dd877180.aspx
Note, if you use Bing or Google maps (or just about any other major mapping platform), they require all asset tracking applications to have a license to use the maps. If you use Bing Maps, you can find details on licensing here: https://www.microsoft.com/maps/licensing/licensing.aspx#mainTab4

keep private google indoor locations

Once again, I'm trying to deal with something not really well documented on Google Maps API.
I'm doing a small webapp which would require to be able to map indoor areas BUT I've to keep them private.
For now, I don't find any informations related to this question.
I've found many quite similar questions on stackoverflow which seems to feet my needs regarding the title, BUT once I read the question, everything is related to Android or IOS however, I'm looking to do this on a regular WebPlatform using Maps APIs provided for this plateform.
If anyone as a hint, it will really help so, thanks in advance.
The documentation for custom StreetViews you find on https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
Keeping the images private is not hard to achieve, the images are loaded directly by the client, so you may e.g. use a serverside script that handles the requests and for example checks for a valid session before it delivers the images.
According to the GoogleMaps community forum (https://support.google.com/maps/thread/124604237/how-can-i-make-indoor-maps-private?hl=en) it is not possible to render google indoor maps private. One solution could be using mapspeople api which uses google maps and draws indoor maps on a top layer, or resort to mapwize which utilizes OpenStreetMaps as a base map to draw indoor maps layers on.
https://www.mapspeople.com/mapsindoors/
https://www.mapwize.io/
note that mapspeople requires payment, while mapwize has a very basic free version.

For Developing Location based reminder mobile app, which one is good..... Google Maps or Nokia maps

I am developing GPS based Location reminder in j2me. I am little bit confuse to which maps i use??.....Google maps & Nokia maps. Which one allows me good working... The working of my app are as follows :-
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
-app will save that searched place coordinates & remind when it reached to near that place.
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is from his destination.
The real choice here lies in whether to use a RESTful API like the Google Static Maps (or Nokia's RESTful Maps) or to use a native Java ME mapping library plugin such as the Nokia Maps API for Java ME. The latter has several major advantages:
Static mapping services such as the Google Static Maps API or Nokia's
RESTful Map API do not cache or tile the images when requested,
therefore each request involves a round trip to the server. If the
map on a mobile application needs to be refreshed at any time, using
a caching library will result in a reduction in network traffic after
around three maps have been displayed. An explanation of this can be
found here
As the name implies, Google's Static Maps API can only retrieve over
http static images for a requested coordinate point, image size,
image type and zoom level. Newer libraries offer additional
functionality out of the box offering dynamic Map content and touch
support, where the user can move around his/her current position,
zoom in, zoom out, modify the view mode to satellite or translate an
address to a coordinate point and show that on the map, among others.
This abstraction of the underlying functionality is hidden from the
developer so much less coding is needed in order to achieve the same
result .
Terms and Conditions for Nokia Maps are easier to fulfil than
Google - No legal restrictions of using the API outside a web browser
application or need to provide a link to the native Google Maps App
(if there is one), or to Google Maps (if there isn't one).
Nokia currently offer higher free daily request limits. Nokia Maps
API for Java ME supports up to 50,000 render requests per day and per
unique IP address (as of January 2012), for Nokia Developer
registered users (free of charge) while the limit for Google's Static
Maps API is currently 1000 unique (different) image requests per
viewer per day.
A couple of years ago there wouldn't be a choice, only RESTful solutions existed, but these days I would say a static http solution should only be used if you want a simple single image
As an abstraction of the underlying services, there are already a full set of examples to cover most of your use cases:
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
Maybe you need to use a draggable marker:
http://www.developer.nokia.com/Devel...ples/#standard
Or react to the touch and find a Geocoordinate:
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-app will save that searched place coordinates & remind when it reached to near that place.
This is known as geofencing and is covered by the Location API:
- http://www.developer.nokia.com/Resou...ty-events.html
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is
from his destination.
Showing a Map with a Marker
http://www.developer.nokia.com/Devel...ples/#standard
For distance calculations, I guess you'd be after the ROUTING example
http://www.developer.nokia.com/Devel...mples/#routing
http://www.developer.nokia.com/Commu...g_with_Java_ME
Now you could re-write and all these services from scratch using RESTful APIs (and then go about debugging your code) , but I'm sure you'll agree it would be much easier to use an existing, working and tested framework for the low level plumbing and then just write your code on top using the services.
It is possible to encapsulate RESTful service in Java ME. As an example, added below is a screenshot from an app encapsulating the suggestion service
It is just a lot easier when someone else has already done this work for you and placed it in a library.

How can I run a google maps request offline?

I'm making a visualization using google maps. However, I have to make many direction requests to google maps.
Is there a way to "download" a section of a map, along with all its bus/car/bike routing information, so the direction requests can be done locally?
If it's possible, can you give a rough example to get me in the right direction?
Thanks :)
No there's no offline access to the Maps API, for either viewing tiles for associated services like routing/directions.
Additionally, you must always ensure the results of these types of requests are displayed on a Google map (which must be publicly available for free, according to the terms of service).
If you are looking for the ability to do offline routing with your own dataset, there are a number of open source routing engines available.

Do you know any framework / application to create a google map based web application

I want to create a web application which makes use of Google maps.
Features are quite simple:
Users can login (best with FB connect)
Users can post items which are geolocated
UI consists mainly of a google map with all items
I'm looking for something implemented where you would only have to specify the nature of your items.
Any ideas?
If you're not going to make money off of it, you can use ESRI's Javascript API for free:
ArcGIS Javascript API